package com.ai.common.constant;

import com.ai.entity.made.OpcNodeInfo;
import com.ai.networking.websocket.service.WebSocket;
import org.eclipse.milo.opcua.sdk.client.OpcUaClient;
import org.eclipse.milo.opcua.sdk.client.api.UaClient;
import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscription;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.CopyOnWriteArraySet;

/**
 * @Author jiaok
 * @Date 2024-11-14 11:05
 */
public class OpcConstant {



    /**
     * 缓存opcClient连接
     */
    public static ConcurrentHashMap<String, UaClient> OPC_SERVER_ID_CLIENT_MAP = new ConcurrentHashMap<>();

    /**
     * 缓存opcClient连接的订阅信息
     */
    public static ConcurrentHashMap<String, UaSubscription> OPC_CLIENT_SUBSCRIBE_MAP = new ConcurrentHashMap<>();

    /**
     * 缓存opcClient连接
     */
    public static ConcurrentHashMap<String, ConcurrentLinkedQueue<OpcNodeInfo>> OPC_SERVER_ID_NODE_INFO_MAP = new ConcurrentHashMap<>();

    /**
     * opc匿名连接
     */
    public static String OPC_CONNECT_ANONYMOUS = "1";

    /**
     * opc设备类型
     */
    public static String DEVICE_TYPE = "1";

    /**
     * opc密钥连接
     */
    public static String OPC_CONNECT_SECRET = "2";

}
